Skip to content

通过签约号查询用户状态

通过调用该接口可查询用户的协议状态。

🚫

本接口服务已于 2019.12.16 (北京时间)下线,文档仅做留存参考。

请求参数类型描述
contract_idstring充电授权扣费协议号
queryobject声明请求的查询参数
sub_mchidstring特约商户号
php
$instance->v3->ebike->charge->contracts->_contract_id_->getAsync([
  'contract_id' => 'aAfixCs13LsdKPpfZfDkk2189ssXjfx',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/ebike/charge/contracts/{contract_id}')->getAsync([
  'contract_id' => 'aAfixCs13LsdKPpfZfDkk2189ssXjfx',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/ebike/charge/contracts/{contract_id}']->getAsync([
  'contract_id' => 'aAfixCs13LsdKPpfZfDkk2189ssXjfx',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->ebike->charge->contracts->_contract_id_->get([
  'contract_id' => 'aAfixCs13LsdKPpfZfDkk2189ssXjfx',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/ebike/charge/contracts/{contract_id}')->get([
  'contract_id' => 'aAfixCs13LsdKPpfZfDkk2189ssXjfx',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/ebike/charge/contracts/{contract_id}']->get([
  'contract_id' => 'aAfixCs13LsdKPpfZfDkk2189ssXjfx',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
mchidstring服务商商户号
openidstring用户标识
sub_mchidstring特约商户号
contract_idstring充电授权扣费协议号
contract_statestring协议状态

参阅 官方文档

Published on the GitHub by TheNorthMemory